package com.ruoyi.hqfinance.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.hqfinance.domain.HqReplaceGoodsDealDetail;
import com.ruoyi.hqfinance.domain.vo.HqReplaceGoodsDealDetailVo;
import com.ruoyi.hqfinance.mapper.HqReplaceGoodsDealDetailMapper;
import com.ruoyi.hqfinance.service.HqReplaceGoodsDealDetailService;
import com.ruoyi.logistic.domain.PageDate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class HqReplaceGoodsDealDetailServiceImpl implements HqReplaceGoodsDealDetailService {
    @Autowired
    private HqReplaceGoodsDealDetailMapper hqReplaceGoodsDealDetailMapper;

    @Override
    public List<HqReplaceGoodsDealDetail> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return hqReplaceGoodsDealDetailMapper.selectAll();
    }

    @Override
    public Boolean insert(HqReplaceGoodsDealDetail hqReplaceGoodsDealDetail) {
        return hqReplaceGoodsDealDetailMapper.insert(hqReplaceGoodsDealDetail);
    }

    @Override
    public Boolean update(HqReplaceGoodsDealDetail hqReplaceGoodsDealDetail) {
        return hqReplaceGoodsDealDetailMapper.update(hqReplaceGoodsDealDetail);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return hqReplaceGoodsDealDetailMapper.deleteById(id);
    }

    @Override
    public List<HqReplaceGoodsDealDetail> search(HqReplaceGoodsDealDetailVo hqReplaceGoodsDealDetailVo) {
        PageHelper.startPage(hqReplaceGoodsDealDetailVo.getPageDate());
        return hqReplaceGoodsDealDetailMapper.search(hqReplaceGoodsDealDetailVo);
    }
}
